//
//  ESNavigationController.m
//  Eyeshot
//
//  Created by admin on 15/6/30.
//  Copyright (c) 2015年 eyeshot. All rights reserved.
//

#import "ESNavigationController.h"
#import "ESNavigationBar.h"
#import "UIBarButtonItem+ExtraMethod.h"

@interface ESNavigationController ()

@end

@implementation ESNavigationController

+ (void)initialize
{
    UINavigationBar *appearance = [UINavigationBar appearance];
    
    // 设置导航栏背景
    UIImage *image = [UIImage imageWithColor:ESColor(0, 128, 198)];
    [appearance setBackgroundImage:image forBarMetrics:UIBarMetricsDefault];
    [appearance setTintColor:[UIColor whiteColor]];
    
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    // 替换为自定义的导航栏
    [self setValue:[[ESNavigationBar alloc] init] forKeyPath:@"navigationBar"];
}

@end
